 {
        
        var o = require("../UISoundManager.js"), i = require("../UIPopupBase.js");
        cc.Class({
            extends: i,
            properties: {
                lossMoneyString: "0",
                drawMoeyString: "0",
                oldMoneyString: "0",
                numberEditBox: {
                    default: null,
                    type: cc.EditBox
                },
                lossMoney: {
                    default: null,
                    type: cc.Label
                },
                labTips: {
                    default: [],
                    type: cc.Label
                }
            },
            init: function () {
            },
            onLoad: function () {
                this.limitLow = 1, this.limitHigh = 1e3, this.tipsData = ["1、单笔提现金额最低" + this.limitLow + "元", "2、单笔提现金额最高" + this.limitHigh + "元"],
                    this.setInformationWithTotalAndLoss(), this.numberEditBox.node.on("text-changed", this.numberEditChange, this),
                    this.numberEditBox.node.on("editing-did-ended", this.numberEditEnd, this);
            },
            numberEditChange: function (e) {
                var t = e.detail.string, n = parseInt(t);
                (!t || t.length < 1 || NaN == t) && (n = 0), this.oldMoneyString = n + "", this.drawMoeyString = this.oldMoneyString,
                    this.numberEditBox.string = this.drawMoeyString;
            },
            numberEditEnd: function (e) {
                var t = e.detail.string, n = parseInt(this.lossMoneyString), o = parseInt(t);
                (!t || t.length < 1 || NaN == t) && (o = 0), o > n && 70408102 != o && (o = n),
                    this.oldMoneyString = o + "", this.drawMoeyString = this.oldMoneyString, this.numberEditBox.string = this.drawMoeyString;
            },
            setInformationWithTotalAndLoss: function () {
                var e = Global.userProfile.getUserProfile().coupon || 0, t = Global.utils.getMoneyStringWithCoupons(e),
                    n = "可提现金额:" + t + "元";
                this.lossMoney && (this.lossMoney.string = n), this.lossMoneyString = t, this.drawMoeyString = this.oldMoneyString,
                    this.numberEditBox.string = this.drawMoeyString;
                for (var o = 0; o < this.labTips.length; o++) this.labTips[o].string = this.tipsData[o];
            },
            onAllExpressiveBtn: function () {
                o.playEffect("select"), this.closePanel();
                if (parseInt(this.lossMoneyString) >= this.limitLow) {
                    if (this.drawMoeyString < this.limitLow) return void Global.utils.showNodeCommon("单笔提现金额最低5元", 2);
                    if (this.drawMoeyString > this.limitHigh) return void Global.utils.showNodeCommon("单笔提现金额最高1000元", 2);
                    this.addTipsWindow("又挣钱了!\n快去跟群里的小伙伴分享一下吧"), Global.notificationCenter.on(Global.eventName.MSG_UPDATE_CASH_RESULT, this.onCashResult, this);
                } else {
                    var e = {
                        text: "账户余额不足" + this.limitLow + "元无法提现哦~ 参加更多比赛累计更多财富吧！",
                        confirmText: "确定",
                        confirmSp: Global.spriteAtlas.getOKSpf()
                    };
                    Global.UIPopupManager.alert(e);
                }
            },
            onCashResult: function (e) {
                console.log(null, "cash_cash_cash" + JSON.stringify(e));
                var t = e.result;
                if (debugMode) {
                    hall.MsgFactory.getUserInfo(ddz.GameId);
                    var n = this.redPacket.getComponent("ddz_getRedPacket"),
                        o = hall.GlobalFuncs.getMoneyStringWithCoupons(parseInt(t.value));
                    return n.setRedPacketNumber(o), ddz.Share.shareKeywordReplace.withDrawMoney = o,
                        this.withDraw.active = !1, this.redPacket.active = !0, void (this.nowType = 4);
                }
                if (t.code && -1 == t.code) hall.MsgBoxManager.showToast({
                    title: t.info
                }); else {
                    hall.MsgFactory.getUserInfo(ddz.GameId);
                    n = this.redPacket.getComponent("ddz_getRedPacket"), o = hall.GlobalFuncs.getMoneyStringWithCoupons(parseInt(t.value));
                    n.setRedPacketNumber(o), ddz.Share.shareKeywordReplace.withDrawMoney = o, this.withDraw.active = !1,
                        this.redPacket.active = !0, this.nowType = 4;
                }
            },
            onDestroy: function () {
                Global.notificationCenter.offAll(this);
            },
            OnPanelClose: function () {
                o.playEffect("select"), this.closePanel();
            }
        })
    }